<template>
  <div class="list">
    <search>
      <div class="switch" @click="toggleBtn">
        <i class="iconfont icon-fenleiorguangchangorqita"></i>
      </div>
    </search>
    <filterTab />
  </div>
</template>

<script>
import Search from "@/components/search";
import filterTab from "./components/filterTab";
import bus from "@/event";

export default {
  data() {
    return {
      flag: true,
    };
  },
  components: {
    Search,
    filterTab,
  },
  methods: {
    toggleBtn() {
      this.flag = !this.flag;
      bus.$emit("toggle", this.flag);
    },
  },
};
</script>

<style lang="less" scoped>
.list {
  background-color: #f4f4f4;
}
.switch {
  width: 3rem;
  text-align: center;
  // background-color: pink;
}
</style>